select FORMSON_0126.*,c1.SHOWVALUE as STATTIME,c2.SHOWVALUE as ENDTIME,FORMMAIN_0125.ID as "TWOID",
formmain_0134.FIELD0002 as "VaType",formmain_0135.FIELD0002 as "VaDaiMa",COL_SUMMARY.id as "Liuc",
FORMSON_0126.FORMMAIN_ID as "Fid",ORG_MEMBER.NAME as USERNAME,ORG_UNIT.NAME as DEPTNAME,"temp_org_member_group"."company"as ADDRESS,
FORMSON_0126.ID as "CID",to_char(FORMSON_0126.FIELD0010,'yyyyMMdd') as "XJKSRQ",to_char(FORMSON_0126.FIELD0011,'yyyyMMdd') as "XJJSRQ",
FORMMAIN_0125.field0001 as "DJLSH",formmain_0125.field0067 as "BT",
FORMSON_0126.ID as "邮箱唯一编号",formson_0126.FIELD0033 as "G-HR职员编号",FORMMAIN_0125.ID as "SEQ",formmain_0134.FIELD0002 as "休假类型代码",
formmain_0135.FIELD0002 as "休假类别",to_char(FORMSON_0126.FIELD0010,'yyyyMMdd') as "开始日期",to_char(FORMSON_0126.FIELD0011,'yyyyMMdd') as "结束日期",c1.SHOWVALUE as "开始时间",c2.SHOWVALUE as "结束时间",formson_0126.FIELD0041 as "使用时间",formson_0126.FIELD0042 as "使用天数",
FORMSON_0126.FIELD0012 as "请假事由"
from FORMSON_0126
left outer join   CTP_ENUM_ITEM  c1 on FORMSON_0126.FIELD0077=c1.ID
left outer join 	CTP_ENUM_ITEM c2 on FORMSON_0126.FIELD0078=c2.ID
left outer join 	formmain_0134 on FORMSON_0126.FIELD0009=formmain_0134.FIELD0001
left outer join 	formmain_0135 on FORMSON_0126.FIELD0043=formmain_0135.FIELD0001
left outer join FORMMAIN_0125 on FORMSON_0126.FORMMAIN_ID=FORMMAIN_0125.ID
left outer join  COL_SUMMARY on FORMSON_0126.FORMMAIN_ID=COL_SUMMARY.form_recordid
LEFT JOIN ORG_MEMBER ON ORG_MEMBER.CODE = FORMSON_0126.FIELD0033
LEFT outer JOIN "temp_org_member_group" ON ORG_MEMBER.ID = "temp_org_member_group"."member_id"
LEFT JOIN ORG_UNIT ON ORG_MEMBER.ORG_DEPARTMENT_ID = ORG_UNIT."ID"
where FORMSON_0126.FORMMAIN_ID=?
AND ORG_MEMBER.IS_ENABLE = 1 AND ORG_MEMBER.IS_DELETED = 0